Repository navigation
Documentation for Radius + Flux integration - #1408
willdavsmith merged 6 commits into
Conversation
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
| 1. This is the second step, and will be displayed with a 2 in the docs. | ||
| 1. This is the third step, and will be displayed with a 3. | ||
| 1. This is the first step of a process. | ||
| ``` |
There was a problem hiding this comment.
typo that I came across
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
brooke-hamilton
left a comment
There was a problem hiding this comment.
Nice docs. 📜 Small suggestions.
|
|
||
| This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}). | ||
|
|
||
| ## Overview |
There was a problem hiding this comment.
This section contains the Radius configuration instead of an overview. How about renaming this section to "Radius Setup" or "Radius Configuration" and have a brief "Overview" section of one or two sentences that describes how Radius needs configuration files added and Flux needs to be configured to connect to the repo where Radius config files are stored?
There was a problem hiding this comment.
Can we just fold this all into one Flux How-To guide under a parent GitOps section?
willtsai
left a comment
There was a problem hiding this comment.
Overall, great comprehensive content! I have some in line suggestions and also request that you organize the content into a set of how-to guides, similar to how the Dapr guides are organized: docs/content/guides/author-apps/dapr
There was a problem hiding this comment.
let's remove this for now, we usually don't add "coming soon" style content like this to our tech documentation
| tags: ["flux", "gitops", "continuous", "delivery", "deployment"] | ||
| --- | ||
|
|
||
| This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}). |
There was a problem hiding this comment.
| This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}). | |
| This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), an open-source GitOps tool that's also part of the CNCF. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}). |
|
|
||
| This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}). | ||
|
|
||
| ## Overview |
| ### Install the Flux CLI | ||
|
|
||
| 1. Follow the [Flux CLI installation instructions](https://fluxcd.io/docs/installation/#install-the-flux-cli) to install the Flux CLI on your local machine. | ||
|
|
||
| 1. Verify the installation by running: | ||
|
|
||
| ```bash | ||
| flux version | ||
| ``` | ||
|
|
||
| ### Install the Flux Source Controller | ||
|
|
||
| The only required component for this integration is the Flux source controller. This component is responsible for managing the Git repository and syncing it with your Kubernetes cluster. | ||
|
|
||
| 1. Install Flux in your Kubernetes cluster: | ||
|
|
||
| ```bash | ||
| flux install --namespace=flux-system --version=latest --components=source-controller --network-policy=false | ||
| ``` | ||
|
|
||
| {{< alert title="⚠️ Network Policy" color="warning" >}} | ||
| The `--network-policy=false` flag is specified here to disable the network policy for the Flux source controller, since by default access to Flux components is restricted. For a production setup, you can instead remove this flag and configure the network policy to allow `radius-system` namespace access to the source controller. This will ensure that the source controller can communicate with your Git repository and sync changes effectively. | ||
| For more information on the network policy, see the [Flux documentation](https://fluxcd.io/flux/installation/configuration/optional-components/#network-policies). | ||
| {{< /alert >}} |
There was a problem hiding this comment.
This looks like it's all Flux-specific instructions, can we remove this and just link a pointer to the Flux documentation for these steps? kind of like how we just call out that the user needs to have dapr installed in their cluster and point them to the dapr docs: https://docs.radapp.io/tutorials/dapr/#prerequisites
There was a problem hiding this comment.
fixed, I kept the alert though because the user most likely will not have this flag enabled so I think it'd be good to call it out. In the future we could write a "flux setup" docs page with the right network policy.
| ### Configure Flux | ||
|
|
||
| Now that you have installed the Flux CLI and the source controller, you can use Flux as you do today to manage your Git repository, such as by using the [`flux create source git`](https://fluxcd.io/flux/cmd/flux_create_source_git/) CLI command to associate your Git repository with the Flux source controller. |
There was a problem hiding this comment.
same thing here, just point to Flux, or perhaps even add this step to the troubleshooting section, e.g. If your changes in the repo aren't being detected by Flux, make sure you have configured it properly per the instructions here.
| ## Step 3: Initialize a Radius Environment and Application | ||
|
|
||
| 1. Initialize a new Radius Environment with [`rad init`]({{< ref rad_initialize >}}): | ||
|
|
||
| ```bash | ||
| rad init | ||
| ``` | ||
|
|
||
| When asked if you want to create a new application select "Yes". This will create a new file named `app.bicep` in your directory where your application will be defined. It will also create a [`bicepconfig.json`]({{< ref "/guides/tooling/bicepconfig/overview" >}}) file that will contain the necessary setup to use Radius types with Bicep. |
There was a problem hiding this comment.
remove this and just add it as an additional item in prereqs:
- [Radius environment]({{< ref "installation#step-3-initialize-radius" >}})
- [Radius local-dev Recipes]({{< ref howto-dev-recipes >}})
| ## Step 3: Prepare Application for Deployment by Flux | ||
|
|
||
| 1. Open `app.bicep` and see the scaffolded application created by `rad init`: | ||
|
|
||
| {{% rad file="snippets/1-app.bicep" embed=true %}} | ||
|
|
||
| 1. Update the `app.bicep` file. We want to link the default environment and specify an application to deploy Radius resources to. | ||
|
|
||
| {{% rad file="snippets/2-app-with-environment.bicep" embed=true %}} | ||
|
|
||
| This Radius application is now ready to be deployed. Instead of using the `rad deploy` CLI command, we will use Flux to detect changes in the Git repository and deploy the application automatically. |
There was a problem hiding this comment.
Make this its own step, and instead of asking the user to use the scaffolded default app, have them just create a new app.bicep with the bicep snippet available for them to follow. See example here: https://docs.radapp.io/guides/author-apps/dapr/how-to-dapr-sidecar/
| git push origin main | ||
| ``` | ||
|
|
||
| ## Step 4: Configure Flux to Manage Your Application |
There was a problem hiding this comment.
these Flux specific steps are fine to include as they are core to the Flux+Radius workflow
| ``` | ||
|
|
||
| Congratulations! You have successfully integrated Radius with Flux for GitOps. You can now manage your Radius applications using Git as the single source of truth. | ||
|
|
There was a problem hiding this comment.
add a clean up step for the user to clean up the Radius stuff they created for this how-to, see https://docs.radapp.io/guides/author-apps/dapr/how-to-dapr-sidecar/#cleanup
|
|
||
| ## Next steps | ||
|
|
||
| Check out the [Radius + GitOps overview]({{< ref "guides/deploy-apps/gitops/overview" >}}) for more detailed information on how to use Radius with GitOps. |
There was a problem hiding this comment.
| Check out the [Radius + GitOps overview]({{< ref "guides/deploy-apps/gitops/overview" >}}) for more detailed information on how to use Radius with GitOps. | |
| Check out the [Radius + GitOps overview]({{< ref "guides/deploy-apps/gitops/overview" >}}) for more information on how to use Radius integrates with GitOps solutions. |
| To enable this integration, you need to create a `radius-config.yaml` file in your Git repository. This file specifies the Bicep files to deploy and their parameters. | ||
|
|
||
| Here is an example showing all of the options for the `radius-config.yaml` file: |
There was a problem hiding this comment.
| To enable this integration, you need to create a `radius-config.yaml` file in your Git repository. This file specifies the Bicep files to deploy and their parameters. | |
| Here is an example showing all of the options for the `radius-config.yaml` file: | |
| To enable this integration, you need to create a `radius-gitops-config.yaml` file in your Git repository. This file specifies the Bicep files to deploy and their parameters. | |
| Here is an example showing all of the options for the `radius-gitops-config.yaml` file: |
# Description * Add Radius Flux controller and tests * Update test workflows to install and use Flux and Gitea * Add bicep container and changes to allow for Bicep to run server-side in `controller` pod Note: I expect the functional tests to fail for this PR because I'm updating the functional test workflow. Here's a link to a successful action run: https://github.com/radius-project/radius/actions/runs/14074009492 Design PR: radius-project/design-notes#79 Docs PR: radius-project/docs#1408 ## Type of change <!-- Please select **one** of the following options that describes your change and delete the others. Clearly identifying the type of change you are making will help us review your PR faster, and is used in authoring release notes. If you are making a bug fix or functionality change to Radius and do not have an associated issue link please create one now. --> - This pull request fixes a bug in Radius and has an approved issue (issue link required). - This pull request adds or changes features of Radius and has an approved issue (issue link required). - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). <!-- Please update the following to link the associated issue. This is required for some kinds of changes (see above). --> Fixes: #6689 ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: - An overview of proposed schema changes is included in a linked GitHub issue. - [ ] Yes - [x] Not applicable - A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [x] Yes - [ ] Not applicable - The design document has been reviewed and approved by Radius maintainers/approvers. - [x] Yes - [ ] Not applicable - A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] Yes - [x] Not applicable - A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [x] Yes - [ ] Not applicable - A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] Yes - [x] Not applicable --------- Signed-off-by: willdavsmith <willdavsmith@gmail.com>
willtsai
left a comment
There was a problem hiding this comment.
Thanks for the edits, looking good so far! My last piece of feedback is to bring this GitOps Overview page back (it was in your previous commit) - 06ba960#diff-b714710b9e0d5608c922f58f9232cf560c965f9a825398bc7032c755a45289de
# Description * Add Radius Flux controller and tests * Update test workflows to install and use Flux and Gitea * Add bicep container and changes to allow for Bicep to run server-side in `controller` pod Note: I expect the functional tests to fail for this PR because I'm updating the functional test workflow. Here's a link to a successful action run: https://github.com/radius-project/radius/actions/runs/14074009492 Design PR: radius-project/design-notes#79 Docs PR: radius-project/docs#1408 ## Type of change <!-- Please select **one** of the following options that describes your change and delete the others. Clearly identifying the type of change you are making will help us review your PR faster, and is used in authoring release notes. If you are making a bug fix or functionality change to Radius and do not have an associated issue link please create one now. --> - This pull request fixes a bug in Radius and has an approved issue (issue link required). - This pull request adds or changes features of Radius and has an approved issue (issue link required). - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). <!-- Please update the following to link the associated issue. This is required for some kinds of changes (see above). --> Fixes: #6689 ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: - An overview of proposed schema changes is included in a linked GitHub issue. - [ ] Yes - [x] Not applicable - A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [x] Yes - [ ] Not applicable - The design document has been reviewed and approved by Radius maintainers/approvers. - [x] Yes - [ ] Not applicable - A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] Yes - [x] Not applicable - A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [x] Yes - [ ] Not applicable - A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] Yes - [x] Not applicable --------- Signed-off-by: willdavsmith <willdavsmith@gmail.com>
* Docs for GitOps + Flux Signed-off-by: willdavsmith <willdavsmith@gmail.com> * spellcheck Signed-off-by: willdavsmith <willdavsmith@gmail.com> * spelling Signed-off-by: willdavsmith <willdavsmith@gmail.com> * PR Signed-off-by: willdavsmith <willdavsmith@gmail.com> * PR Signed-off-by: willdavsmith <willdavsmith@gmail.com> * PR Signed-off-by: willdavsmith <willdavsmith@gmail.com> --------- Signed-off-by: willdavsmith <willdavsmith@gmail.com> Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
* Docs for GitOps + Flux Signed-off-by: willdavsmith <willdavsmith@gmail.com> * spellcheck Signed-off-by: willdavsmith <willdavsmith@gmail.com> * spelling Signed-off-by: willdavsmith <willdavsmith@gmail.com> * PR Signed-off-by: willdavsmith <willdavsmith@gmail.com> * PR Signed-off-by: willdavsmith <willdavsmith@gmail.com> * PR Signed-off-by: willdavsmith <willdavsmith@gmail.com> --------- Signed-off-by: willdavsmith <willdavsmith@gmail.com> Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
Thank you for helping make the Radius documentation better!
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
Issue reference